using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace Suucha.Adsi.Configuration
{
    /// <summary>
    /// 
    /// </summary>
    public class AdsiSettings : ConfigurationElement
    {
        private const string pathProperty = "path";
        private const string userNameProperty = "userName";
        private const string passwordProperty = "password";
        private const string nameProperty = "name";

        /// <summary>
        /// 
        /// </summary>
        public AdsiSettings()
        {
        }

        public AdsiSettings(string name, string path, string userName, string password)
        {
            this.Name = name;
            this.Path = path;
            this.UserName = userName;
            this.Password = password;
        }

        /// <summary>
        /// 
        /// </summary>
        [ConfigurationProperty(nameProperty, IsKey=true, IsRequired=true)]
        public string Name
        {
            get
            {
                return (string)this[nameProperty];
            }
            set
            {
                this[nameProperty] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        [ConfigurationProperty(pathProperty, IsRequired=true)]
        public string Path
        {
            get
            {
                return (string)this[pathProperty];
            }
            set
            {
                this[pathProperty] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        [ConfigurationProperty(userNameProperty)]
        public string UserName
        {
            get
            {
                return (string)this[userNameProperty];
            }
            set
            {
                this[userNameProperty] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        [ConfigurationProperty(passwordProperty)]
        public string Password
        {
            get
            {
                return (string)this[passwordProperty];
            }
            set
            {
                this[passwordProperty] = value;
            }
        }
    }
}
